<!DOCTYPE html>

<head>
	<title>数据统计</title>
	<meta name='viewport' content='width=480' charset="utf-8" />
	<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11/vue.min.js"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.19.2/axios.min.js"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.0/index.js"></script>
	<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.0/theme-chalk/index.css">
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<script src="{{ url_for('yobot_static', filename='yocool/js/yocool.iii.js') }}"></script>
	<link rel="stylesheet" href="{{ url_for('yobot_static', filename='yocool/css/style.css') }}">
	<style>
	body{
      text-align:center;
    }
    .big{
      font-size:32px;
    }
    .exbig{
      font-size:48px;
    }
    .el-row {
      margin-bottom: 15px;
    }
    el-button{
      width: 80px;
    }
	.lib
	{
	display:inline-block;
	}
	.lib2
	{
	display:inline-block;
	margin: 0px 10px;
	}
	
	
	a {
	    text-decoration: none;
	    color: #000;
	}
	
	img {
	    border: 0;
	}
	
	body {
	    color: #666;
	}
	
	html, body, div, dl, dt, dd, ol, ul, li, h1, h2, h3, h4, h5, h6, p, blockquote, pre, button, fieldset, form, input, legend, textarea, th, td {
	    margin: 0;
	    padding: 0;
	}
	
	a {
	    text-decoration: none;
	    color: #08acee;
	}
	
	button {
	    outline: 0;
	}
	
	button,input,optgroup,select,textarea {
	    margin: 0;
	    font: inherit;
	    color: inherit;
	    outline: none;
	}
	
	li {
	    list-style: none;
	}
	
	a {
	    color: #666;
	}
  </style>
</head>

<body>
	<div id="app">
<div id="topToolbar">
		<el-page-header @back="location='..'" content=""></el-page-header>
		<div class="logo"><a class="url" href="http://175.24.70.191:9222/xcw/main/"></a></div>
		<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleTitleSelect">
			<el-menu-item index="5">我的</el-menu-item>
			<el-menu-item index="4">统计</el-menu-item>
			<el-menu-item index="3">查刀</el-menu-item>
			<el-menu-item index="2">预约</el-menu-item>
			<el-menu-item index="1">面板</el-menu-item>
		</el-menu>
</div>
		<el-container style="margin-top: 70px">
			<div class="Service-box">
			<div class="Service-content clearfix">
			<el-button class="Service-item" @click="location.href='./1/'">
			    <div class="item-image">
			        <img src="{{ url_for('yobot_static', filename='yocool/images/peko.png') }}" alt="">
			    </div>
			    <h3 class="item-title">出刀顺序记录</h3>
			    <div class="item-text">公会成员出刀顺序记录表</div>
			    <span class="item-link">立即查看</span>
			</el-button>
			<el-button class="Service-item" @click="location.href='./2/'">
			    <div class="item-image">
			        <img src="{{ url_for('yobot_static', filename='yocool/images/cocolo.png') }}" alt="" style="width: 75%;">
			    </div>
			    <h3 class="item-title">数据分析图表</h3>
			    <div class="item-text">多种数据图表分析</div>
			    <span class="item-link">立即查看</span>
			</el-button>
			<el-button class="Service-item" onclick="window.location.href = 'http://tools.yobot.win/pcrd-yobot-fe/'">
			    <div class="item-image">
			        <img src="{{ url_for('yobot_static', filename='yocool/images/blackcat.png') }}" alt="">
			    </div>
			    <h3 class="item-title">多重维度分析</h3>
			    <div class="item-text">会战成员数据分析</div>
			    <span class="item-link">立即查看</span>
				</el-button>
			
			</div>
			<p>
				<br>原始数据<br><br>
				<div class="lib2"><a href="./api/"><button class="el-button el-button--info el-button--small">查看本轮</button></a></div>
				<div class="lib2"><a href="./api/" download><button class="el-button el-button--info el-button--small">下载本轮</button></a><br></div>
				<div class="lib2"><a href="./api/?battle_id=all"><button class="el-button el-button--info el-button--small">查看全部</button></a></div>
				<div class="lib2"><a href="./api/?battle_id=all" download><button class="el-button el-button--info el-button--small">下载全部</button></a><br></div>
				<br><br>
				<div>
					{% if allow_api -%}
					<input id="apiurl" style=" position: fixed;  width: 5px;    top: -30px;   height: 6px;" readonly />
					{% else -%}
					api访问已禁用，如需开启请前往<a href="../setting/">公会设置</a>
					{% endif -%}
					<br><input type="button" value="获取api" id="copy" class="el-button el-button--success el-button--small">
				</div>
			</p>
			</div>
			<!-- <el-button class="lib" type="danger" @click="location.href='./3/'">成员伤害统计</el-button> -->
			<!-- <a href="http://tools.yobot.win/pcrd-yobot-fe/" style="margin-left: 10px"><el-button class="lib" type="success">多维度分析</el-button></a> -->
		</el-container>
	</div>
	
</body>

<script>
	var csrf_token = "{{ session['csrf_token'] }}";
</script>
<script src="{{ url_for('yobot_static', filename='clan/statistics.js') }}"></script>
<script>
	var apikey = "{{ apikey }}";
	document.getElementById("apiurl").value = window.location.href + "api/?apikey=" + apikey;
	document.getElementById("copy").addEventListener("click", e => {
		document.getElementById("apiurl").select();
		document.execCommand("Copy");
		alert("API复制成功");
	})
</script>

</html>
<!--
    统计1：出刀顺序表 by @Ai-Himmel https://github.com/Ai-Himmel
    统计2：数据图表 by @Diving-Fish & @Winrey https://github.com/Diving-Fish
	统计3：成员伤害统计 by @芙兰朵露 https://github.com/flandre
	多维度分析 by @Tan90Qian https://github.com/Tan90Qian
  
        api说明：
        公会战管理员在设置中开启“允许外部api调用”后，可在外部直接调用，
        也可以直接下载json文件
        
        参数：

        apikey：外部调用时必填
        battle_id：整数，公会战的场次号码，填“current”获取当前，填“all”则获取所有，默认值“current”

        返回数据：

        code：0是成功，其他值是失败
        api_version：api版本号，整数
        message：失败原因
        groupinfo：群组信息
        members：成员列表
        challenges：出刀记录表
	-->
